\section{voe\+\_\+handler.\+c File Reference}
\label{voe__handler_8c}\index{voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}}


Vendor specific over Ether\+C\+AT protocol handler functions.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{voe__handler_8c_a8ec96afd19421aaaf473543f6603bc09}} 
\#define \textbf{ E\+C\+\_\+\+M\+B\+O\+X\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+OE}~0x0f
\begin{DoxyCompactList}\small\item\em VoE mailbox type. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a8f58e3b11fea87f8fc8503a571d77228}} 
\#define \textbf{ E\+C\+\_\+\+V\+O\+E\+\_\+\+H\+E\+A\+D\+E\+R\+\_\+\+S\+I\+ZE}~6
\begin{DoxyCompactList}\small\item\em VoE header size. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a490aa0619114e852dc92e954c12d8ebf}} 
\#define \textbf{ E\+C\+\_\+\+V\+O\+E\+\_\+\+R\+E\+S\+P\+O\+N\+S\+E\+\_\+\+T\+I\+M\+E\+O\+UT}~500
\begin{DoxyCompactList}\small\item\em VoE response timeout in [ms]. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{voe__handler_8c_a654a0fe3a3271278e71977c8900d0abe}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+write\+\_\+start} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Start writing VoE data. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_aea222d10074f966ce59e320b112a8e3b}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+write\+\_\+response} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Wait for the mailbox response. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a7ccd97e7eec931b2786f85eb8cd768c9}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+start} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Start reading VoE data. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a0a823c493b4b556cbf34cdf4881e0c02}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+check} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Check for new data in the mailbox. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a02e821274f1254316f4f9bd9250353bb}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+response} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Read the pending mailbox data. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a5935291f786fefb13cc3af4a95b70f59}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+start} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Start reading VoE data without sending a sync message before. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Read the pending mailbox data without sending a sync message before. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a2fa83fd99610e6095841b063f59a987f}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+end} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Successful termination state function. \end{DoxyCompactList}\item 
\mbox{\label{voe__handler_8c_a47e00873115c360caea558f435527ece}} 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+error} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Failure termination state function. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+init} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe, \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$sc, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em VoE handler constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+clear} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em VoE handler destructor. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size} (const \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Get usable memory size. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+send\+\_\+header} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe, uint32\+\_\+t vendor\+\_\+id, uint16\+\_\+t vendor\+\_\+type)
\begin{DoxyCompactList}\small\item\em Sets the VoE header for future send operations. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+received\+\_\+header} (const \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe, uint32\+\_\+t $\ast$vendor\+\_\+id, uint16\+\_\+t $\ast$vendor\+\_\+type)
\begin{DoxyCompactList}\small\item\em Reads the header data of a received VoE message. \end{DoxyCompactList}\item 
uint8\+\_\+t $\ast$ \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+data} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Access to the VoE handler\textquotesingle{}s data. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+data\+\_\+size} (const \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Returns the current data size. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+read} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Start a VoE read operation. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+read\+\_\+nosync} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Start a VoE read operation without querying the sync manager status. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+write} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Start a VoE write operation. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+request\+\_\+state\+\_\+t} \textbf{ ecrt\+\_\+voe\+\_\+handler\+\_\+execute} (\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$voe)
\begin{DoxyCompactList}\small\item\em Execute the handler. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Vendor specific over Ether\+C\+AT protocol handler functions. 



\subsection{Function Documentation}
\mbox{\label{voe__handler_8c_a2605f7a74b7a09b7c16a24777181aeb4}} 
\index{voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}!ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response@{ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response}}
\index{ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response@{ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response}!voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}}
\subsubsection{ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response()}
{\footnotesize\ttfamily void ec\+\_\+voe\+\_\+handler\+\_\+state\+\_\+read\+\_\+nosync\+\_\+response (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$}]{voe }\end{DoxyParamCaption})}



Read the pending mailbox data without sending a sync message before. 

This might lead to an empty reponse from the client. 

Definition at line 462 of file voe\+\_\+handler.\+c.

\mbox{\label{voe__handler_8c_ac4f3ad1fe200fa0a1ea9c77d9a400f4d}} 
\index{voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}!ec\+\_\+voe\+\_\+handler\+\_\+init@{ec\+\_\+voe\+\_\+handler\+\_\+init}}
\index{ec\+\_\+voe\+\_\+handler\+\_\+init@{ec\+\_\+voe\+\_\+handler\+\_\+init}!voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}}
\subsubsection{ec\+\_\+voe\+\_\+handler\+\_\+init()}
{\footnotesize\ttfamily int ec\+\_\+voe\+\_\+handler\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$}]{voe,  }\item[{\textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$}]{sc,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



VoE handler constructor. 

\begin{DoxyReturn}{Returns}
Return value of \doxyref{ec\+\_\+datagram\+\_\+prealloc()}{p.}{datagram_8c_a407dc1f0c4247f84e4193b4368be8a8b}. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em voe} & VoE handler. \\
\hline
{\em sc} & Parent slave configuration. \\
\hline
{\em size} & Size of memory to reserve. \\
\hline
\end{DoxyParams}


Definition at line 76 of file voe\+\_\+handler.\+c.

\mbox{\label{voe__handler_8c_a5177aa3c9bf760a01f2fa069536a1499}} 
\index{voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}!ec\+\_\+voe\+\_\+handler\+\_\+clear@{ec\+\_\+voe\+\_\+handler\+\_\+clear}}
\index{ec\+\_\+voe\+\_\+handler\+\_\+clear@{ec\+\_\+voe\+\_\+handler\+\_\+clear}!voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}}
\subsubsection{ec\+\_\+voe\+\_\+handler\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+voe\+\_\+handler\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$}]{voe }\end{DoxyParamCaption})}



VoE handler destructor. 


\begin{DoxyParams}{Parameters}
{\em voe} & VoE handler. \\
\hline
\end{DoxyParams}


Definition at line 99 of file voe\+\_\+handler.\+c.

\mbox{\label{voe__handler_8c_ac8a107ca2649552e8601f563046573f4}} 
\index{voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}!ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size@{ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size}}
\index{ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size@{ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size}!voe\+\_\+handler.\+c@{voe\+\_\+handler.\+c}}
\subsubsection{ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size()}
{\footnotesize\ttfamily size\+\_\+t ec\+\_\+voe\+\_\+handler\+\_\+mem\+\_\+size (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+voe\+\_\+handler\+\_\+t} $\ast$}]{voe }\end{DoxyParamCaption})}



Get usable memory size. 

\begin{DoxyReturn}{Returns}
Memory size. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em voe} & VoE handler. \\
\hline
\end{DoxyParams}


Definition at line 112 of file voe\+\_\+handler.\+c.

